
                当前位置：
                <a href="<?php echo site_url('admin/content/index'); ?>" class="layui-btn layui-btn-sm fr">内容列表</a>
                <span class="layui-breadcrumb" lay-separator="/">
                    <a href="<?php echo site_url('admin/content/index'); ?>">内容管理</a>
                    <a><cite>添加内容</cite></a>
                </span>

                <fieldset class="layui-elem-field layui-field-title">
                    <legend>添加内容</legend>
                </fieldset>

                <form class="layui-form layui-form-pane" action="" method="post">
                    <div class="layui-tab layui-tab-brief" lay-filter="infoTab">
                        <ul class="layui-tab-title">
                            <li class="layui-this">基本信息</li>
                            <li>详细内容</li>
                            <li>SEO设置</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">所属分类</label>
                                    <div class="layui-input-inline">
                                        <select name="category_id" lay-filter="category_id" lay-verify="required">
                                            <option value="">--请选择--</option>
                                            <?php
                                            if (! empty($category)):
                                                $category_id = $this->uri->segment(4, 0);
                                                foreach ($category as $key => $value):
                                            ?>
                                            <option value="<?php echo $value['id']; ?>"<?php echo $category_id == $value['id'] ? ' selected' : ''; ?>><?php echo str_repeat('&nbsp;', ($value['level'] - 1) * 4) , $value['name']; ?></option>
                                            <?php
                                                endforeach;
                                            endif;
                                            ?>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">标题</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">图片</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="image" lay-verify="" class="layui-input">
                                    </div>
                                    <div class="layui-input-inline input-file">
                                        <button type="button" class="layui-btn upload-image" data-url="<?php echo current_url(); ?>?type=image" data-type="image" data-exts="jpg|png|gif|bmp|jpeg" data-name="image"><i class="layui-icon layui-icon-upload"></i>上传图片</button>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">如有图片请上传</div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">浏览次数</label>
                                    <div class="layui-input-inline">
                                        <input type="number" name="views" lay-verify="number" class="layui-input" min="0" value="100">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否推荐</label>
                                    <div class="layui-input-inline">
                                        <input type="checkbox" name="recommend" lay-skin="switch" lay-text="On|Off" title="开关" value="1">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">状态</label>
                                    <div class="layui-input-inline">
                                        <input type="checkbox" name="status" lay-skin="switch" lay-text="On|Off" title="开关" value="1" checked>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">排序</label>
                                    <div class="layui-input-inline">
                                        <input type="number" name="sort" lay-verify="number" autocomplete="off" class="layui-input" min="0" value="100">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">值越小越靠前</div>
                                </div>
                            </div>

                            <div class="layui-tab-item">
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">内容详情</label>
                                    <div class="layui-input-block">
                                        <textarea name="content" style="width: 100%; height: 400px;"></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-tab-item">
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">网页标题</label>
                                    <div class="layui-input-block">
                                        <textarea class="layui-textarea" name="meta_title"></textarea>
                                    </div>
                                </div>

                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">网页关键词</label>
                                    <div class="layui-input-block">
                                        <textarea class="layui-textarea" name="meta_keywords"></textarea>
                                    </div>
                                </div>
                                
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">网页描述</label>
                                    <div class="layui-input-block">
                                        <textarea class="layui-textarea" name="meta_description"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="form-info">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
